
public class InsertSort {
	public static void main(String[] args) {
		int[] array = {10,9,8,7,6,5,4,3,2,1,0};
		
		for(int i = 0;	i<array.length-1 ; i++ ){
			int insertValue = array[i+1];
			int index = i ;
			while(index>= 0 && insertValue< array[index]){
				array[index + 1] = array[index];
				index --;
			}
			array[index + 1] = insertValue;
		}
		
		for(int i : array){
			System.out.print(i+" ");
		} 
	}
}
